//===----------------------------------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//

import Foundation

/// A namespace that provides paths for files generated by the `generate-swift-format` tool.
@_spi(Internal) public enum GenerateSwiftFormatPaths {
  private static let sourcesDirectory =
    URL(fileURLWithPath: #file)
    .deletingLastPathComponent()
    .deletingLastPathComponent()
  public static let rulesDirectory =
    sourcesDirectory
    .appendingPathComponent("SwiftFormat")
    .appendingPathComponent("Rules")
  public static let pipelineFile =
    sourcesDirectory
    .appendingPathComponent("SwiftFormat")
    .appendingPathComponent("Core")
    .appendingPathComponent("Pipelines+Generated.swift")
  public static let ruleRegistryFile =
    sourcesDirectory
    .appendingPathComponent("SwiftFormat")
    .appendingPathComponent("Core")
    .appendingPathComponent("RuleRegistry+Generated.swift")
  public static let ruleNameCacheFile =
    sourcesDirectory
    .appendingPathComponent("SwiftFormat")
    .appendingPathComponent("Core")
    .appendingPathComponent("RuleNameCache+Generated.swift")
  public static let ruleDocumentationFile =
    sourcesDirectory
    .appendingPathComponent("..")
    .appendingPathComponent("Documentation")
    .appendingPathComponent("RuleDocumentation.md")
}
